<!DOCTYPE html>
<html>
<head>
    <title>{$name} {$seo_title} {$site_name}</title>
    <meta name="keywords" content="{$seo_keywords}"/>
    <meta name="description" content="{$seo_description}">
    <tc_include file="Public:head"/>
    <link href="/themes/simplebootx/Public/assets/css/index/style.css?v={$SOURCE_VERSION}" rel="stylesheet"/>
    <link href="/themes/simplebootx/Public/assets/css/index/skitter.css" rel="stylesheet"/>
    <style>
        .newsFlash .new_list {
            font-size: 16px;
            line-height: 20px;
            position: relative;
            margin-top: 10px;
        }
        .newsFlash .new_list .newsFlash_content {
            font-size: 14px;
        }
        .color-tab {
            color: #c8161d;
        }
        .ellipsis2 {overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 2;-webkit-box-orient: vertical;}
        .ellipsis3 {overflow: hidden; text-overflow:ellipsis; display: -webkit-box; -webkit-line-clamp: 3;-webkit-box-orient: vertical;}
        .no-active {
            display: none;
        }
        /*主页行家样式修改*/
        .desc span {
            font-size: 14px;
            line-height: 18px;
        }
        .desc .mz {
            color: #000232!important;
            font-size: 18px;
        }
        /*商讯*/
        .sl_nav {
            margin-top: 10px!important;
            margin-bottom:0!important;
        }
        .business_item{
            margin-top: 25px;
            border-bottom: 1px solid #efefef;
        }
        .business_item .title{
            font-size: 18px;
            color: #333333;
            line-height: 24px;
            letter-spacing: 1px;
            font-weight: bolder;
        }
        .business_item .icon{
            font-size: 14px;
            line-height: 18px;
            color: #c5c5c5;
            margin: 4px 0 6px;
        }
        .business_item .icon .name{
            float: right;
        }
        /*侧边栏样式*/
        .span3 .release_btn {
            font-size: 18px;
            font-weight: bold;
            letter-spacing: 2px;
            margin-top: 15px;
        }
        .span3 .release_btn a {
            color: #c8161d;
        }
        .span3 .advertise {
            height: 210px;
            width: 350px;
            margin-top: 32px;
        }
        .span3 .advertise img{
            width: 100%;
            height: 100%;
        }
        .span3 .author {
            margin-top: 52px;
        }
    </style>
</head>
<body>

<tc_include file="Public:nav"/>

<div class="container tc-main">
    <div class="row" style="margin-left:0px;width: 1200px;">
        <!-- margin-left: 0px; -->
        <div class="span9" style="width: 760px;margin-left: 0px;">
            <!-- 快讯列表 -->
            <div class="sl_nav_out">
                <div class="sl_nav" id="sl_nav">
                    <ul>
                        <li>
                            <a class="{$cat_id == 0 ? 'color-tab' : ''}" href="{:U('Portal/Businessnews/lists')}">全部</a>
                        </li>
                        <foreach name="categorys" item="vo">
                            <li>
                                <a class="{$cat_id == $vo['id'] ? 'color-tab' : ''}" href="{:U('Portal/Businessnews/lists',array('cat_id' => $vo['id']))}">{$vo.name}</a>
                            </li>
                        </foreach>
                    </ul>
                </div>
                <div class="business">
                    <volist name="news_lists" id="vo">
                        <a href="{:U('Portal/Businessnews/news_detail', ['id' => $vo['id']])}">
                            <div class="business_item">
                                <p class="ellipsis2 title">{$vo.post_title}</p>
                                <div class="icon">
                                    <span class="timer">{:time_format($vo['post_date'])}</span>
                                    <span class="name">{$vo.post_author_name}</span>
                                </div>
                            </div>
                        </a>
                    </volist>
                </div>

                <!--加载更多-->
                <div style="width:110px;height: 30px;border-radius: 15px;border: 1px solid #C8161D; color: #C8161D;font-size: 15px;text-align: center;
            line-height: 30px;margin-left: 350px; " class="js-infinite-scroll-loading text-center fontmsyhbd">更多</div>
                <div id="nextpage"></div>
            </div>
            <!-- 标题页结束 -->
        </div>
        <!--slide边栏-->
        <div class="span3" style="margin-left: 80px;width: 350px;">
            <!--发布商讯-->
            <div class="release_btn"><a href="{:U('Portal/Businessnews/edit_business_news')}">发布商讯</a></div>

            <!--商讯列表页广告-->
            <if condition="!empty($advertisement)">
                <a href="{$advertisement.post_source}">
                    <div class="advertise">
                        <img src="{$advertisement.thumb_img}" alt="">
                    </div>
                </a>
            </if>

            <!--专栏作者-->
            <php>
                $professor = get_professor_list();
            </php>
            <if condition="!empty($professor)">
                <div class="author">
                    <div class="h2_ground">
                        <a href="{:U('portal/index/professor_list')}">More</a>
                        <h2>行家</h2>
                    </div>
                    <div class="expert" style="margin-top: 44px;">
                        <ul>
                            <volist name="professor" id="vo">
                                <a href="{:U('user/index/professor_homepage', array('professor_id' => $vo['user_id']))}">
                                    <li>
                                        <div class="caijian">
                                            <img src="{:sp_get_user_avatar_url($vo['avatar'])}?t={:time()}" class="my-photo" alt="专栏作者">
                                        </div>
                                        <div class="desc">
                                            <div class="table_cell">
                                                <p>
                                                    <span class="mz">{$vo.user_nicename|default=$vo['user_login']}</span>
                                                </p>
                                                <p style="line-height: 22px;height: 22px;overflow:hidden;">
                                                    <span class="name" style="font-size: 14px;margin-right: 8px;">{$vo.company}</span>
                                                    <span style="font-size: 14px;">{$vo.position}</span>
                                                </p>
                                            </div>
                                            <p class="text ellipsis2">{$vo.signature}</p>
                                        </div>
                                    </li>
                                </a>
                            </volist>
                        </ul>
                    </div>
                </div>
            </if>
        </div>
    </div>
</div>
<tc_include file="Public:footer"/>
<!-- JavaScript -->
<tc_include file="Public:scripts"/>

<script type="text/javascript">
    // 滚动文章
    $(document).ready(function () {

        $(".box_skitter_large").skitter({
            animation: "random",
            interval: 3000,
            numbers: false,
            numbers_align: "right",
            hideTools: true,
            controls: false,
            focus: false,
            focus_position: true,
            width_label: '425px',
            enable_navigation_keys: true,
            progressbar: false
        });
    });
</script>
<script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>
<script type="text/javascript">

    $('#nextpage').infiniteScroll({
        loading:'.js-infinite-scroll-loading',
        total_pages:{$total_pages},
        success:function(content){
            var $items = $(content).find('div.business a');
            if ($items.length > 0) {
                $('div.business').append($items);
            }
        }
    });


    // tab 导航栏置顶
    (function () {
        var target = document.getElementById('sl_nav');

        window.onscroll = function () {
            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
            if (scrollTop > 300) {
                target.classList.add('act');
            }
            else {
                target.classList.remove('act');
            }
        }
    })();

    $(document).ready(function () {
        $('.new_list').click(function () {
            $(this).find('.newsFlash_content').slideToggle("fast");
        })
    })
</script>
</body>
</html>